import request from '/src/axios.js';

export const regionApi = {
  getList: (current, size, params) => request({
    url: '/api/blade-system/region/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  }),
  getLazyTree: (parentCode, params) => request({
    url: '/api/blade-system/region/lazy-tree',
    method: 'get',
    params: {
      ...params,
      parentCode
    }
  }),
  getDetail: (code) => request({
    url: '/api/blade-system/region/detail',
    method: 'get',
    params: {
      code
    }
  }),
  remove: (id) => request({
    url: '/api/blade-system/region/remove',
    method: 'post',
    params: {
      id,
    }
  }),
  submit: (row) => request({
    url: '/api/blade-system/region/submit',
    method: 'post',
    data: row
  })
}
